package com.sxwl;

import com.sxwl.auth.netty.ChatServer;
import io.netty.channel.ChannelFuture;
import org.mapstruct.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ConfigurableApplicationContext;
import tk.mybatis.spring.annotation.MapperScan;

/**
 * @author reading
 * @Description TODO
 * @Date 2020/4/1 0:05
 */
@SpringBootApplication
@EnableDiscoveryClient
@MapperScan("com.sxwl.auth.mapper")
public class CoreServiceApplication   {
    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(CoreServiceApplication.class, args);
        ChatServer chatServer = context.getBean(ChatServer.class);
        chatServer.start();//启动netty服务

    }

}
